//
//  State.swift
//  MagaCore
//
//  Created by MrMessy on 2023/5/9.
//

import Foundation
import ReSwift
import StoreKit
import SwiftUI

struct HTAppState {
    var var_animeState: HTAnimeState = .init()
    var var_shareState: HTShareState = .init()
    var var_searchState: HTSearchState = .init()
    var var_subscribeState: HTSubscribeState = .init()
    var var_adState: HTAdState = .init()
    var var_pushState: HTPushState = .init()
}

struct HTAnimeState {
    var var_banners: [HTAnime]?
    var var_subjects: [HTSubject]?
    var var_subjectList: [HTAnime]?
    var var_animeAll: HTAnimeAll?
    var var_animeUrls: [HTServer]?
}

struct HTShareState {
    var var_share: HTShare?
}

struct HTSearchState {
    var var_populars: [HTSearchPopular]?
    var var_searchAnimes: [HTAnime]?
    var var_searchHistory: [String]?
}

struct HTSubscribeState {
    var var_subscribes: [HTSubscribe]?
    var var_selSubscribeIndex: Int? = 0
    var var_selSubscribe: HTSubscribe? = HTSubscribe()
    var var_curSubscribe: HTSubscribe?
    var var_introductorySubscribe: HTSubscribe? = HTSubscribe()
    var var_purchasingSubscribe: Bool? = false
}

struct HTAdState {
    var var_adConfig: HTAdConfig? = HTAdConfig()
    var var_showPremiumGuideStatus: String = "0"
}

struct HTPushState {
    var var_push: HTPush?
    var var_colorScheme: ColorScheme = .light
}
